package com.jlg.actions.register;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Standard;
import org.springframework.beans.factory.annotation.Autowired;

import com.jlg.service.user.UserManager;
import com.julewa.Client;

@Standard
public class IndexAction {
	
	@Autowired Client client;
	@Autowired UserManager manager;
	
	public String execute(){
		return "new";
	}
	
	String email = null;
	String password = null;
	String repassword = null;
	
	@Action("notice")
	public String notice(){
		if(email == null){
			return "new";
		}
		if(password == null){
			return "new";
		}
		if(!password.equals(repassword)){
			return "new";
		}
		if(password.length() < 6){
			return "new";
		}
		//
		
		//
		return "notice";
	}
	
	@Action("confirm")
	public String confirm(){
		return "success";
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getRepassword() {
		return repassword;
	}

	public void setRepassword(String repassword) {
		this.repassword = repassword;
	}
	
	
	
}